package Chapter3;

class Outer3{
	private int num=4;
	public void test() {
		//定义方法内部类
		class Inner{
			void show(){
				System.out.println("num="+num);//访问外部类成员变量
			}
		}
		Inner in=new Inner();
		in.show();
	}
}

public class Example18 {
	public static void main(String[] args) {
		Outer3 outer=new Outer3();
		outer.test();
	}

}
